import Cookies from 'js-cookie'

const TokenKey = 'userToken'
    // const UserKey = 'userInfo'
export function getToken() {
    return Cookies.get(TokenKey)
}

export function setToken(token) {
    return Cookies.set(TokenKey, token)
}
// export function getUserInfo() {
//   return JSON.parse(localStorage.getItem(UserKey))
// }
// export function setUserInfo(userInfo) {
//   localStorage.setItem(UserKey, JSON.stringify(userInfo))
// }
export function removeToken() {
    return Cookies.remove(TokenKey)
}